package dataserver.pojo;

import lombok.*;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import javax.persistence.*;
import java.util.List;

/**
 *@类:设备与管理系统关系表
 */
@Entity
@Table(name = "scene_device_relation")
@Data
@AllArgsConstructor //生成全参数构造函数
@NoArgsConstructor//生成无参构造函数
public class SceneDeviceRelation extends BaseId {

    /**
     * 站场id
     */
    @Column(name = "station_id")
    private String stationId;

    /**
     * 站场名称
     */
    @Column(name = "station_name")
    private String stationName;

   /**
    * UE场景中名称
    */
   @Column(name = "unreal_name")
   private String unrealName;

   /**
    * 数据类型
    */
   @Column(name = "type")
   private String type;

   /**
    * 系统点位编号
    */
   @Column(name = "equipment_id")
   private String equipmentId;

   /**
    * 系统点位名称
    */
   @Column(name = "equipment_name")
   private String equipmentName;

   /**
    * 系统点位信息
    */
   @Column(name = "equipment_info")
   private String equipmentInfo;

    // 关联模型
    @OneToOne(cascade = CascadeType.ALL, orphanRemoval = true)
    @JoinColumn(name = "unreal_name", referencedColumnName = "unreal_name", insertable = false, updatable = false)
    private SceneDevice sceneDevice;

}